//
//  AddSuccessfulViewController.m
//  markmap
//
//  Created by 甘世清 on 2024/3/29.
//

#import "AddSuccessfulViewController.h"

@interface AddSuccessfulViewController ()

@end

@implementation AddSuccessfulViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)SQ_UIViewForSelfView{
    SQCustomButton * btn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(120, 120) midmargin:20];
    btn.text = SQNSLocalString(@"添加成功");
    btn.textColor = UIColor.whiteColor;
    btn.font = FONT_MEDIUM(20);
    btn.image = SQGetImage(@"插画");
    [self.view addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self.view);
        make.size.mas_equalTo(SCREEN_WIDETH);
    }];
    WS(weakSelf);
    [btn setTouchBlock:^(SQCustomButton * _Nonnull button) {
            [weakSelf.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];
    }];
    [LSTTimer addTimerForTime:3 identifier:@"" handle:^(NSString * _Nonnull day, NSString * _Nonnull hour, NSString * _Nonnull minute, NSString * _Nonnull second, NSString * _Nonnull ms) {
        btn.text = [NSString stringWithFormat:@"%@ %@",SQNSLocalString(@"添加成功"),second];
    } finish:^(NSString * _Nonnull identifier) {
        [weakSelf.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];
    } pause:^(NSString * _Nonnull identifier) {
        
    }];
}
- (void)dealloc{
    DTLog(@"提示页面释放");
}
@end
